﻿using Architecture.Api.Application.Commands.CultureCommand;
using Architecture.Domain.Services.Interface;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.CultureHandler
{
    public class CultureBatchCulturePicCommandHandler : IRequestHandler<CultrueBatchCulturePicCommand, int>
    {
        private readonly ICultureService _cultureService;

        public CultureBatchCulturePicCommandHandler(ICultureService cultureService)
        {
            _cultureService = cultureService;
        }

        public async Task<int> Handle(CultrueBatchCulturePicCommand request, CancellationToken cancellationToken)
        {
            return await _cultureService.BatchCulturePicList(request.productionLot, request.urlImg);
        }
    }
}
